# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: 3ED <krzysztof1987 at gmail dot com>

pkgname=perl-x11-protocol-other
pkgver=31
pkgrel=1
pkgdesc="Extra extransions for perl-x11-protocol"
arch=('any')
url=https://search.cpan.org/dist/X11-Protocol-Other/
license=('GPL')
depends=('perl-x11-protocol')
makedepends=('perl-extutils-makemaker')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/K/KR/KRYDE/X11-Protocol-Other-${pkgver}.tar.gz)
sha256sums=('3c625993dc7a8eb1d02e07108a666302459c6fc6f9f3d27615f7495158dc73f4')

build() {
  cd "${srcdir}"/X11-Protocol-Other-${pkgver}

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  perl Makefile.PL
  make
}

check() {
  cd "${srcdir}"/X11-Protocol-Other-${pkgver}

  make test
}

package() {
  cd "${srcdir}"/X11-Protocol-Other-${pkgver}

  make install
}
